/*
 * Copyright 2020 HPB Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.hpb.bc.entity;

import java.math.BigDecimal;
import java.util.Date;

public class HpbNodePerBlockRewardRecord extends BaseEntity {
    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hpb_node_per_block_reward_record.block_hash
     *
     * @mbg.generated
     */
    private String blockHash;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hpb_node_per_block_reward_record.block_number
     *
     * @mbg.generated
     */
    private Long blockNumber;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hpb_node_per_block_reward_record.block_timestamp
     *
     * @mbg.generated
     */
    private Long blockTimestamp;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hpb_node_per_block_reward_record.hpb_node_amount
     *
     * @mbg.generated
     */
    private Long hpbNodeAmount;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hpb_node_per_block_reward_record.candidate_node_amount
     *
     * @mbg.generated
     */
    private Long candidateNodeAmount;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hpb_node_per_block_reward_record.per_block_mint_reward_total_amount
     *
     * @mbg.generated
     */
    private BigDecimal perBlockMintRewardTotalAmount;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hpb_node_per_block_reward_record.per_block_vote_reward_total_amount
     *
     * @mbg.generated
     */
    private BigDecimal perBlockVoteRewardTotalAmount;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hpb_node_per_block_reward_record.per_block_reward_total_amount
     *
     * @mbg.generated
     */
    private BigDecimal perBlockRewardTotalAmount;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hpb_node_per_block_reward_record.create_timestamp
     *
     * @mbg.generated
     */
    private Date createTimestamp;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hpb_node_per_block_reward_record.update_timestamp
     *
     * @mbg.generated
     */
    private Date updateTimestamp;

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hpb_node_per_block_reward_record.block_hash
     *
     * @return the value of hpb_node_per_block_reward_record.block_hash
     *
     * @mbg.generated
     */
    public String getBlockHash() {
        return blockHash;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hpb_node_per_block_reward_record.block_hash
     *
     * @param blockHash the value for hpb_node_per_block_reward_record.block_hash
     *
     * @mbg.generated
     */
    public void setBlockHash(String blockHash) {
        this.blockHash = blockHash == null ? null : blockHash.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hpb_node_per_block_reward_record.block_number
     *
     * @return the value of hpb_node_per_block_reward_record.block_number
     *
     * @mbg.generated
     */
    public Long getBlockNumber() {
        return blockNumber;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hpb_node_per_block_reward_record.block_number
     *
     * @param blockNumber the value for hpb_node_per_block_reward_record.block_number
     *
     * @mbg.generated
     */
    public void setBlockNumber(Long blockNumber) {
        this.blockNumber = blockNumber;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hpb_node_per_block_reward_record.block_timestamp
     *
     * @return the value of hpb_node_per_block_reward_record.block_timestamp
     *
     * @mbg.generated
     */
    public Long getBlockTimestamp() {
        return blockTimestamp;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hpb_node_per_block_reward_record.block_timestamp
     *
     * @param blockTimestamp the value for hpb_node_per_block_reward_record.block_timestamp
     *
     * @mbg.generated
     */
    public void setBlockTimestamp(Long blockTimestamp) {
        this.blockTimestamp = blockTimestamp;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hpb_node_per_block_reward_record.hpb_node_amount
     *
     * @return the value of hpb_node_per_block_reward_record.hpb_node_amount
     *
     * @mbg.generated
     */
    public Long getHpbNodeAmount() {
        return hpbNodeAmount;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hpb_node_per_block_reward_record.hpb_node_amount
     *
     * @param hpbNodeAmount the value for hpb_node_per_block_reward_record.hpb_node_amount
     *
     * @mbg.generated
     */
    public void setHpbNodeAmount(Long hpbNodeAmount) {
        this.hpbNodeAmount = hpbNodeAmount;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hpb_node_per_block_reward_record.candidate_node_amount
     *
     * @return the value of hpb_node_per_block_reward_record.candidate_node_amount
     *
     * @mbg.generated
     */
    public Long getCandidateNodeAmount() {
        return candidateNodeAmount;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hpb_node_per_block_reward_record.candidate_node_amount
     *
     * @param candidateNodeAmount the value for hpb_node_per_block_reward_record.candidate_node_amount
     *
     * @mbg.generated
     */
    public void setCandidateNodeAmount(Long candidateNodeAmount) {
        this.candidateNodeAmount = candidateNodeAmount;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hpb_node_per_block_reward_record.per_block_mint_reward_total_amount
     *
     * @return the value of hpb_node_per_block_reward_record.per_block_mint_reward_total_amount
     *
     * @mbg.generated
     */
    public BigDecimal getPerBlockMintRewardTotalAmount() {
        return perBlockMintRewardTotalAmount;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hpb_node_per_block_reward_record.per_block_mint_reward_total_amount
     *
     * @param perBlockMintRewardTotalAmount the value for hpb_node_per_block_reward_record.per_block_mint_reward_total_amount
     *
     * @mbg.generated
     */
    public void setPerBlockMintRewardTotalAmount(BigDecimal perBlockMintRewardTotalAmount) {
        this.perBlockMintRewardTotalAmount = perBlockMintRewardTotalAmount;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hpb_node_per_block_reward_record.per_block_vote_reward_total_amount
     *
     * @return the value of hpb_node_per_block_reward_record.per_block_vote_reward_total_amount
     *
     * @mbg.generated
     */
    public BigDecimal getPerBlockVoteRewardTotalAmount() {
        return perBlockVoteRewardTotalAmount;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hpb_node_per_block_reward_record.per_block_vote_reward_total_amount
     *
     * @param perBlockVoteRewardTotalAmount the value for hpb_node_per_block_reward_record.per_block_vote_reward_total_amount
     *
     * @mbg.generated
     */
    public void setPerBlockVoteRewardTotalAmount(BigDecimal perBlockVoteRewardTotalAmount) {
        this.perBlockVoteRewardTotalAmount = perBlockVoteRewardTotalAmount;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hpb_node_per_block_reward_record.per_block_reward_total_amount
     *
     * @return the value of hpb_node_per_block_reward_record.per_block_reward_total_amount
     *
     * @mbg.generated
     */
    public BigDecimal getPerBlockRewardTotalAmount() {
        return perBlockRewardTotalAmount;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hpb_node_per_block_reward_record.per_block_reward_total_amount
     *
     * @param perBlockRewardTotalAmount the value for hpb_node_per_block_reward_record.per_block_reward_total_amount
     *
     * @mbg.generated
     */
    public void setPerBlockRewardTotalAmount(BigDecimal perBlockRewardTotalAmount) {
        this.perBlockRewardTotalAmount = perBlockRewardTotalAmount;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hpb_node_per_block_reward_record.create_timestamp
     *
     * @return the value of hpb_node_per_block_reward_record.create_timestamp
     *
     * @mbg.generated
     */
    public Date getCreateTimestamp() {
        return createTimestamp;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hpb_node_per_block_reward_record.create_timestamp
     *
     * @param createTimestamp the value for hpb_node_per_block_reward_record.create_timestamp
     *
     * @mbg.generated
     */
    public void setCreateTimestamp(Date createTimestamp) {
        this.createTimestamp = createTimestamp;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hpb_node_per_block_reward_record.update_timestamp
     *
     * @return the value of hpb_node_per_block_reward_record.update_timestamp
     *
     * @mbg.generated
     */
    public Date getUpdateTimestamp() {
        return updateTimestamp;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hpb_node_per_block_reward_record.update_timestamp
     *
     * @param updateTimestamp the value for hpb_node_per_block_reward_record.update_timestamp
     *
     * @mbg.generated
     */
    public void setUpdateTimestamp(Date updateTimestamp) {
        this.updateTimestamp = updateTimestamp;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table hpb_node_per_block_reward_record
     *
     * @mbg.generated
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        HpbNodePerBlockRewardRecord other = (HpbNodePerBlockRewardRecord) that;
        return (this.getBlockHash() == null ? other.getBlockHash() == null : this.getBlockHash().equals(other.getBlockHash()))
            && (this.getBlockNumber() == null ? other.getBlockNumber() == null : this.getBlockNumber().equals(other.getBlockNumber()))
            && (this.getBlockTimestamp() == null ? other.getBlockTimestamp() == null : this.getBlockTimestamp().equals(other.getBlockTimestamp()))
            && (this.getHpbNodeAmount() == null ? other.getHpbNodeAmount() == null : this.getHpbNodeAmount().equals(other.getHpbNodeAmount()))
            && (this.getCandidateNodeAmount() == null ? other.getCandidateNodeAmount() == null : this.getCandidateNodeAmount().equals(other.getCandidateNodeAmount()))
            && (this.getPerBlockMintRewardTotalAmount() == null ? other.getPerBlockMintRewardTotalAmount() == null : this.getPerBlockMintRewardTotalAmount().equals(other.getPerBlockMintRewardTotalAmount()))
            && (this.getPerBlockVoteRewardTotalAmount() == null ? other.getPerBlockVoteRewardTotalAmount() == null : this.getPerBlockVoteRewardTotalAmount().equals(other.getPerBlockVoteRewardTotalAmount()))
            && (this.getPerBlockRewardTotalAmount() == null ? other.getPerBlockRewardTotalAmount() == null : this.getPerBlockRewardTotalAmount().equals(other.getPerBlockRewardTotalAmount()))
            && (this.getCreateTimestamp() == null ? other.getCreateTimestamp() == null : this.getCreateTimestamp().equals(other.getCreateTimestamp()))
            && (this.getUpdateTimestamp() == null ? other.getUpdateTimestamp() == null : this.getUpdateTimestamp().equals(other.getUpdateTimestamp()));
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table hpb_node_per_block_reward_record
     *
     * @mbg.generated
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getBlockHash() == null) ? 0 : getBlockHash().hashCode());
        result = prime * result + ((getBlockNumber() == null) ? 0 : getBlockNumber().hashCode());
        result = prime * result + ((getBlockTimestamp() == null) ? 0 : getBlockTimestamp().hashCode());
        result = prime * result + ((getHpbNodeAmount() == null) ? 0 : getHpbNodeAmount().hashCode());
        result = prime * result + ((getCandidateNodeAmount() == null) ? 0 : getCandidateNodeAmount().hashCode());
        result = prime * result + ((getPerBlockMintRewardTotalAmount() == null) ? 0 : getPerBlockMintRewardTotalAmount().hashCode());
        result = prime * result + ((getPerBlockVoteRewardTotalAmount() == null) ? 0 : getPerBlockVoteRewardTotalAmount().hashCode());
        result = prime * result + ((getPerBlockRewardTotalAmount() == null) ? 0 : getPerBlockRewardTotalAmount().hashCode());
        result = prime * result + ((getCreateTimestamp() == null) ? 0 : getCreateTimestamp().hashCode());
        result = prime * result + ((getUpdateTimestamp() == null) ? 0 : getUpdateTimestamp().hashCode());
        return result;
    }
}